package com.example.springboot.mapper;

import com.example.springboot.controller.request.BaseRequest;
import com.example.springboot.controller.request.LoginRequest;
import com.example.springboot.controller.request.PasswordRequest;
import com.example.springboot.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author:
 * @Description: TODO
 * @DateTime: 2022/11/25 16:31
 **/
@Mapper
public interface AdminMapper {
    /*查询数据库中所有数据*/
    List<Admin> list();

    List<Admin> listBycondition(BaseRequest baseRequest);

    void sava(Admin user);

    void update(Admin user);

    Admin getById(Integer id);

    void delete(Integer id);

    Admin getByUsernameandPassword(LoginRequest loginRequest);

    int updatepassword(PasswordRequest passwordRequest);

}
